package com.doerit.dao;

import com.doerit.model.User;
import com.doerit.model.UserExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
  
  @Select("SELECT * FROM tbl_user WHERE EMAIL = #{email} AND PASSWORD=#{password} AND IS_DELETED=0")
  @ResultMap("MiniResultMap")
  public User findByNameAndPassword(@Param("email") String email, @Param("password") String password);
  
  @Select("SELECT * FROM tbl_user WHERE EMAIL = #{email} AND IS_DELETED=0")
  @ResultMap("MiniResultMap")
  public User findByEmail(String email);
  
  int countByExample(UserExample example);
  int deleteByExample(UserExample example);
  int deleteByPrimaryKey(Integer id);
  int insert(User record);
  int insertSelective(User record);
  List<User> selectByExampleWithBLOBs(UserExample example);
  List<User> selectByExample(UserExample example);
  User selectByPrimaryKey(Integer id);
  int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
  int updateByExampleWithBLOBs(@Param("record") User record, @Param("example") UserExample example);
  int updateByExample(@Param("record") User record, @Param("example") UserExample example);
  int updateByPrimaryKeySelective(User record);
  int updateByPrimaryKeyWithBLOBs(User record);
  int updateByPrimaryKey(User record);

  
}
